package com.chenlonghai.sbmybatis.interceptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

@SpringBootConfiguration
public class AdminLoginAdapter extends WebMvcConfigurerAdapter {
	
	
	@Autowired
	 AdminLoginInterceptor  adminLoginInterceptor;
	
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		// TODO Auto-generated method stub
		System.out.println("registry-->" +registry.toString());
		registry.addInterceptor(adminLoginInterceptor).addPathPatterns("/app/**").excludePathPatterns("/app/uploadFile");
		super.addInterceptors(registry);
	}

}
